# 使用官方Nginx镜像作为基础
FROM nginx:alpine

# 删除默认的配置文件
RUN rm /etc/nginx/conf.d/default.conf  

# 将本地的自定义配置文件复制到容器中
COPY nginx.conf /etc/nginx/nginx.conf

# 将本机的静态资源复制到容器中
COPY dist /usr/share/nginx/html

# 暴露80端口
EXPOSE 80

# 启动Nginx
ENTRYPOINT ["nginx", "-g", "daemon off;"]
